package com.Sake.chatroom.util;
import com.Sake.common.core.activeMQ.JmsRoomProducer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;


/**
 * 直播间消费者
 *
 * @author zsh
 * @version 1.0.0
 * @date 2021.6.16
 */
@Component
public class JmsRoomConsumer {

    private static final Logger logger = LoggerFactory.getLogger(JmsRoomConsumer.class);

    @Autowired
    private JmsRoomProducer jmsRoomProducer;

    /**
     * 更改直播间状态为结束
     *
     * @param room 直播间详情
     */
    @JmsListener(destination = "Chatroom"  )
    public void startChangeRoomStatus1(String room) {
        logger.info(">>>>>>>>>>>>>接收到了来自聊天室的信息 1 : "+room+"<<<<<<<<<<<<<<<<<<");
    }

    @JmsListener(destination = "Chatroom")
    public void startChangeRoomStatus2(String room) {
        logger.info(">>>>>>>>>>>>>接收到了来自聊天室的信息 2 : "+room+"<<<<<<<<<<<<<<<<<<");
    }

    @JmsListener(destination = "Chatroom")
    public void startChangeRoomStatus3(String room) {
        logger.info(">>>>>>>>>>>>>接收到了来自聊天室的信息 3 : "+room+"<<<<<<<<<<<<<<<<<<");
    }

    @JmsListener(destination = "Chatroom")
    public void startChangeRoomStatus4(String room) {
        logger.info(">>>>>>>>>>>>>接收到了来自聊天室的信息 4 : "+room+"<<<<<<<<<<<<<<<<<<");
    }

}
